package com.wlyuan.index.domain.source.valueobj;

import com.wlyuan.core.marker.INamed;
import com.wlyuan.core.marker.NamedMap;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

@Getter
@AllArgsConstructor
public enum ReceiptType implements INamed<Integer> {
    NORMAL(0, "无"),
    RECOVERED(1, "补单");
    private final Integer value;
    private final String name;

    private static final Map<Integer, ReceiptType> MAP = new NamedMap<>(ReceiptType.class);

    public static ReceiptType valueOf(Integer value) {
        return MAP.get(value);
    }
}